<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" href="/public/images/favicon.ico"/>

    <title>荣联云客服  | 用户登录</title>

    <link href="/public/stylesheets/bootstrap.min.css" rel="stylesheet">
    <link href="/public/font-awesome/css/font-awesome.css" rel="stylesheet">

    <link href="/public/stylesheets/animate.css" rel="stylesheet">
    <link href="/public/stylesheets/style.css" rel="stylesheet">
    <link href="/public/stylesheets/main.css" rel="stylesheet">
    <script type="text/javascript" src="/public/javascripts/jquery.js"></script>

</head>

<body class="gray-bg">

    <div class="loginColumns animated fadeInDown">
        <div class="row">

           <!-- <div class="col-md-6">
                <h2 class="font-bold">Welcome to IN+</h2>

                <p>
                    Perfectly designed and precisely prepared admin theme with over 50 pages with extra new web app views.
                </p>

                <p>
                    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.
                </p>

                <p>
                    When an unknown printer took a galley of type and scrambled it to make a type specimen book.
                </p>

                <p>
                    <small>It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</small>
                </p>

            </div> -->
            <div class="col-md-12 text-center">
                <div class="ibox-content" style="width:50%;margin-left:26%">
                   <p class="text-muted text-center">
                         <span><h3>用户登录</h3></span>   
                         <span class="error-msg" data-func="tip_msg">
                            ${flash?.error}
                         </span>
                    </p>
            
                    <form class="m-t" role="form" action="/login" id="loginForm" method="post">
                        <div class="form-group">
                            <input type="text" data-func="login_field" name="username" class="form-control" placeholder="用户名" required="" value="${params['username']}">
                        </div>
                        <div class="form-group">
                            <input type="password" data-func="login_field" name="password" class="form-control" placeholder="密码" required="">
                        </div>
                        <button type="button" data-func="submit" class="btn btn-primary block full-width m-b">登录</button>

                    </form>
                </div>
            </div>
        </div>
        <hr/>
        <div class="row">
         <!--    <div class="col-md-6">
            </div> -->
            <div class="col-md-12 text-center">
                Powered by <a href="http://www.yunkefu.com" target="_blank">yunkefu.com</a>
          
               <small>© 2014-2015</small>
            </div>
        </div>
    </div>

</body>
<script type="text/javascript">
      $(document).ready(function(){
    	 
    	  $('[data-func="login_field"]').keyup(function(event){
    		 var keycode = event.which;
    		 if(13==keycode){
    			 $('button[data-func="submit"]').trigger('click');
    		 }
    	  });
    	  $('button[data-func="submit"]').click(function(){
    		   var username = $.trim($('input[name="username"]').val());
    		   var password = $.trim($('input[name="password"]').val());
    		   var tipMsg = $('span[data-func="tip_msg"]');
    		   if(!username || !password){
    			   tipMsg.text("用户名和密码均不能为空");
    			   return;
    		   }else{
    			   tipMsg.text(""); 
    			   $("#loginForm").submit();
    		   }
    		  
    	 });
      });
</script>


</html>
